<template>
	<view>
		<view class="article-cell h5_padding">

			<image mode="aspectFill" :src="item.smallImage" class="left img1"></image>
			<view class="cont">
				<view class="title">{{item.title}}</view>
				<view class="line_buttom">
					<image mode="aspectFill" :src="item.head" class="logo"></image>
					<view class="text text1">{{item.author}}</view>
					<view class="text text2">{{item.number}}阅读</view>
					<view class="text text2">{{item.createDate.split(' ')[0]}}</view>
				 
				</view>
			</view>
			<image mode="aspectFill" :src="item.smallImage" class="left img2"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "article-cell",
		props: {
			item: {
				type: Object,
				default: {},
				required: true,
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	

	.article-cell {
		margin-top: 20rpx;
		display: flex;
		justify-content: flex-start;
		
		.img1 {
			display: block;
		}
		
		.img2 {
			display: none; 
		}

		.left {
			flex-grow: 0;
			flex-shrink: 0;
			margin-right: 20rpx;
			width: 278rpx;
			height: 176rpx;
			background-color: #C0C0C0;
		}

		.cont {
			flex-grow: 1;
			display: flex;
			flex-direction: column;

			.title {

				font-size: 22rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #008796;
				line-height: 33rpx;
				letter-spacing: 1rpx;
			}

			.line_content {
				display: flex;

				justify-content: flex-start;

				.text {
					margin-top: 20rpx;
					font-size: 18rpx;

					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
					line-height: 36rpx;
					letter-spacing: 1rpx;
				}


			}

			.line_buttom {
				margin-top: auto;
				display: flex;

				justify-content: flex-start;



				.logo {
					flex-shrink: 0;
					width: 36rpx;
					height: 36rpx;
					background-color: #C0C0C0;
					border-radius: 18rpx;
				}

				.text {
					// flex-shrink:0;
					font-size: 18rpx;

					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
					line-height: 36rpx;
					letter-spacing: 1rpx;


				}

				.text1 {
					-webkit-transform: scale(0.8);
					margin-left: 10rpx;
					transform-origin: left center;
					flex-shrink: 0;
				}

				.text2 {
					-webkit-transform: scale(0.8);
					// margin-left: 40rpx;
					transform-origin: left center;
					flex-shrink: 0;
				}
			}
		}
	}
@media screen and (max-width:750px) {
		.article-cell{
			.img1 {
				display: none;
			}
			
			.img2 {
				display: block;
				margin-right: 0rpx !important;
				margin-left: 20rpx;
			}
			.cont {
			  overflow: hidden;
			  .title {
			  			
			  	font-size: 28rpx;
			  	font-family: PingFangSC-Regular, PingFang SC;
			  	font-weight: 400;
			  	color: #333333;
			  	line-height: 33rpx;
			  	letter-spacing: 1rpx;
				
				  overflow: hidden;
					word-break: break-all;  /* break-all(允许在单词内换行。) */
					text-overflow: ellipsis;  /* 超出部分省略号 */
					display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
					-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
					-webkit-line-clamp: 2; /** 显示的行数 **/
			  }
			  .line_buttom {
			  	 
			  
			  
			  
			  	.logo {
			  		flex-shrink: 0;
			  		width: 36rpx;
			  		height: 36rpx;
			  		background-color: #C0C0C0;
			  		border-radius: 18rpx;
			  	}
			  
			  	.text {
			  		// flex-shrink:0;
			  		font-size: 20rpx;
			  
			  		font-family: PingFangSC-Regular, PingFang SC;
			  		font-weight: 400;
			  		color: #999999;
			  		line-height: 36rpx;
			  		letter-spacing: 1rpx;
			  
			  
			  	}
			  
			  	.text1 {
			  
			  		margin-left: 10rpx;
			  		 
			  		flex-shrink: 0;
			  	}
			  
			  	.text2 {
			  		 
			  		flex-shrink: 0;
			  	}
			  }
			}
			 
			
				
		}
		
	}
</style>
